/**
 * 
 */
package mobi.richaze.llbag.interfaces.struts;

import java.util.List;

import javax.annotation.Resource;

import mobi.richaze.llbag.domain.model.product.Inventory;
import mobi.richaze.llbag.domain.model.product.ProductRepository;
import mobi.richaze.llbag.domain.service.account.AccountService;

import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author Richaze Chou
 * 
 */
@SuppressWarnings("serial")
@Controller
public class IndexAction extends ActionSupport {
	@Resource(name = "AccountServicePojo")
	AccountService accountService;

	@Resource(name = "ProductRepositoryHibernate")
	ProductRepository repository;

	private List<Inventory> inventories;

	@Override
	public String execute() throws Exception {
		inventories = repository.getInventory();
		return SUCCESS;
	}

	public List<Inventory> getInventories() {
		return inventories;
	}

	public void setInventories(List<Inventory> inventories) {
		this.inventories = inventories;
	}

}
